# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        Young  
# Name:         demo1051
# Description:
# Author:       $赵怡蕾
# Date:         2019/3/27
#-------------------------------------------------------------------------------

class RigthTriangle:
    def __init__(self):
        self.n = 1

    def __next__(self):
        result = '*' * (2 * self.n - 1)   # 字符串
        self.n += 1
        return result

    def __iter__(self):
        return self


rt = RigthTriangle()

import time
start = time.time()
for e in rt:
    end = time.time()
    lentime = end - start
    # if(len(e) > 20):
    #     break
    # print(e)
    if (lentime(e) > 10):
        break
    print(e)